import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Child from './component';


class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      increment: 10,
    };
  }
  handleClick() {
     this.setState({
        increment:10 + this.state.increment
      });
  }
  render() {
    return (
      <div>
        <Child img={logo} text={'hello wrold'} increment={this.state.increment}/>
        <div onClick={ e => this.handleClick(e) }> increment : {this.state.increment}</div>
      </div>
    
    );
  }
}

export default App;
